package com.example.yoho.mvp.view.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.yoho.R;
import com.example.yoho.domain.Domain_Url;
import com.example.yoho.mvp.model.entity.BrandListEntity;
import com.example.yoho.utils.MyGlide;


import java.util.List;

public class MyTabBrandAdapter extends BaseQuickAdapter<BrandListEntity.Values, BaseViewHolder> {


    public MyTabBrandAdapter(int layoutResId, @Nullable List<BrandListEntity.Values> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, BrandListEntity.Values item) {
        ImageView imageView=helper.getView(R.id.categorys_image);
        TextView textView=helper.getView(R.id.categorys_tv);
        MyGlide.GlideFor(mContext, Domain_Url.IMAGE_URL+item.getBrand_icon(),imageView);
        textView.setText(item.getBrand_name());
    }


}
